package com.cosyhut.blocks.factory;

import com.cosyhut.blocks.jode.*;

public class MGeomCylinder extends MGeom{
	private float _radius;
	private float _length;
	
	public MGeomCylinder(String model, Material material, int radius, int length) {
		super(model, jodeConstants.dCylinderClass, material);
		this._radius = BFactory.units(radius);
		this._length = BFactory.units(length);
		init();
	}
	
	protected void calculateVolume() {
        this._volume = (float)(this._length * Math.PI * this._radius * this._radius);
	}
	//--------------------------------------------------------------------------
	public float getRadius() {
		return this._radius;
	}
	public float getLength() {
		return this._length;
	}
}
